const {sequelize,Sequelize} = require('../../database/init')

const User = sequelize.define('users',{
    username:{
        type:Sequelize.STRING,
        allowNull:false,
        unique:true
    },
    password:{
        type:Sequelize.STRING,
        allowNull:false,
        unique:false
    },
    usernickname:{
        type:Sequelize.STRING,
        allowNull:true,
        unique:false
    },
    userrole:{
        type:Sequelize.STRING,
        allowNull:false,
        unique:false,
        defaultValue:"student"
    }
})


//User.sync()

module.exports = {
    User
}